<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./../Template/TechnicainTemplate.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui">

    <ui:define name="content">
        <center>
            <f:view>
                <h:form>
                    <h:outputLabel value="EDIT COMPLAINT OF TECHNICAIN" style="color: #0099cc;font-size: large;font-weight: bold"/>
                    <p:panelGrid columns="2" style="width: 800px; border:none ">
                        <f:facet name="header">  
                            EDIT ACCOUNT FORM 
                            <h:form>
                                <h1><h:outputText value="Create/Edit"/></h1>
                                <p:panelGrid columns="2">
                                    
                                    <p:outputLabel value="ActualTime:" for="actualTime" />
                                    <p:inputText id="actualTime" value="#{complaintBean.selectedComplaint.actualTime}" title="ActualTime" >
                                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                                    </p:inputText>
                                    <p:outputLabel value="DateLodge:" for="dateLodge" />
                                    <p:inputText id="dateLodge" value="#{complaintBean.selectedComplaint.dateLodge}" title="DateLodge" >
                                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                                    </p:inputText>
                                    <p:outputLabel value="DateClose:" for="dateClose" />
                                    <p:inputText id="dateClose" value="#{complaintBean.selectedComplaint.dateClose}" title="DateClose" >
                                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                                    </p:inputText>
                                    <p:outputLabel value="Note:" for="note" />
                                    <p:inputTextarea rows="4" cols="30" id="note" value="#{complaintBean.selectedComplaint.note}" title="Note" />
                                    
                                    <p:outputLabel value="Description:" for="description" />
                                    <p:inputTextarea rows="4" cols="30" id="description" value="#{complaintBean.selectedComplaint.description}" title="Description" />
                                    
                                    <p:outputLabel value="Status:" for="status" />
                                    <p:inputText id="status" value="#{complaintBean.selectedComplaint.status.statusId}" title="Status" >
                                        <!-- TODO: update below reference to list of available items-->
                                       
                                    </p:inputText>

                                    <f:facet name="footer">  
                            <center>
                                <p:commandButton value="Update" action="#{complaintBean.update()}" /> 
                                <p:commandButton value="Reset" type="reset"  />  
                                <p:commandLink value="Back to manage page" action="#{complaintBean.back()}" style="right: 5px"/>
                            </center>
                        </f:facet>
                                    
                                    
                                    
                                </p:panelGrid>
                            </h:form>

                        </f:facet>
                    </p:panelGrid>
                </h:form>
            </f:view>
        </center>
    </ui:define>

</ui:composition>
